package com.cqs.example.io.serial;

import java.io.Serializable;

/**
 * 没有制定的版本号的
 * １.jdk自动生成的:他是根据类名、接口名、成员方法及属性等来生成一个64位的哈希字段
 * 2. 添加transient成员变量，私有方法不影响
 * ３．修改成员变量，静态属性, 增加(含静态)方法(非private)，
 * If a serializable class does not explicitly declare a serialVersionUID,
 * then the serialization runtime will calculate a default serialVersionUID value for that class based on various aspects of the class,
 * as described in the Java(TM) Object Serialization Specification.
 * However, it is strongly recommended that all serializable classes explicitly declare serialVersionUID values,
 * since the default serialVersionUID computation is highly sensitive to class details that may vary depending on compiler implementations,
 * and can thus result in unexpected InvalidClassExceptions during deserialization.
 * Therefore, to guarantee a consistent serialVersionUID value across different java compiler implementations,
 * a serializable class must declare an explicit serialVersionUID value.
 * It is also strongly advised that explicit serialVersionUID declarations use the private modifier where possible,
 * since such declarations apply only to the immediately declaring class--serialVersionUID fields are not useful as inherited members.
 * @Author lixw
 * @Date 7/22/20 8:58 AM
 */
public class UnVersionBean implements Serializable {
//    private final static long  serialVersionUID = 6296844433974472442L;

    private String name = "UnVersionBean";

    private int id  = 1000;
    private transient int id0  = 1000;

//    static int a;

//    private void test0(){};
    public void test(){};

//    public UnVersionBean(String name) {
//        this.name = name;
//    }
}
